package o;

import android.content.Context;
import android.text.TextUtils;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map.Entry;
import org.json.JSONException;
import org.json.JSONObject;

public class foi implements Cloneable {
    private String ʻ = "";
    private String ʼ = "";
    private HashMap<String, String> ʽ = new HashMap();
    private Context ˊ;
    private String ˋ = "";
    private String ˎ = "";
    private String ˏ = "";
    private String ॱ = "";
    private String ॱॱ = "";

    private String ˏ(String str) {
        try {
            return URLEncoder.encode(str, "utf-8");
        } catch (UnsupportedEncodingException e) {
            return "";
        }
    }

    public String ˏ(boolean z) {
        if (this.ʽ.isEmpty()) {
            return "";
        }
        JSONObject jSONObject = new JSONObject();
        for (Entry entry : this.ʽ.entrySet()) {
            try {
                jSONObject.put((String) entry.getKey(), entry.getValue());
            } catch (JSONException e) {
                return "";
            }
        }
        if (z) {
            return ˏ(jSONObject.toString());
        }
        return jSONObject.toString();
    }

    public String ॱ(boolean z) {
        if (z) {
            return ˏ(this.ʻ);
        }
        return this.ʻ;
    }

    public String ˎ(boolean z) {
        if (z) {
            return ˏ(this.ˎ);
        }
        return this.ˎ;
    }

    public void ˎ(String str) {
        this.ˎ = str;
    }

    public String ˊ(boolean z) {
        if (z) {
            return ˏ(this.ॱॱ);
        }
        return this.ॱॱ;
    }

    public String ˋ(boolean z) {
        if (z) {
            return ˏ(this.ॱ);
        }
        return this.ॱ;
    }

    public void ˋ(String str) {
        this.ॱ = str;
    }

    public String ʼ(boolean z) {
        if (z) {
            return ˏ(this.ˋ);
        }
        return this.ˋ;
    }

    public void ॱ(String str) {
        this.ˋ = str;
    }

    public Context ˋ() {
        return this.ˊ;
    }

    public void ˏ(Context context) {
        this.ˊ = context.getApplicationContext();
    }

    public String ʻ(boolean z) {
        if (z) {
            return ˏ(this.ˏ);
        }
        return this.ˏ;
    }

    public boolean ॱ() {
        return (this.ˊ == null || TextUtils.isEmpty(this.ˋ) || TextUtils.isEmpty(this.ॱ) || TextUtils.isEmpty(this.ˎ)) ? false : true;
    }

    public Object clone() {
        try {
            foi o_foi = (foi) super.clone();
            HashMap hashMap = new HashMap();
            for (Entry entry : o_foi.ʽ.entrySet()) {
                hashMap.put(entry.getKey(), entry.getValue());
            }
            o_foi.ʽ = hashMap;
            return o_foi;
        } catch (CloneNotSupportedException e) {
            return null;
        }
    }
}
